#include <iostream>
#include <mutex>
#include <fstream>
#include <iostream>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include "../Kongzhi.h"
#include "../../Cunchutijiegou.h"
#include "../../../Serializable/Serializable.hpp"
#include "../../cunchuti_impl/Cunchutiimpl1.h"
using namespace std;

#ifndef CUNCHUTI_KONGZHI
#define CUNCHUTI_KONGZHI
class Cunchuti_kongzhi: public Kongzhi		//Kongzhi的派生類
{
public:
	virtual void add_cunchuti(const string &path) override;
	virtual void rem_cunchuti(string &path) override;
	virtual void charu(char *str, unsigned long kuai_num, int size) override;
	virtual char* quchu(unsigned long kuai_num, int size) override;
	virtual unsigned long get_firstkuai_num(int size) override;
	virtual num_add dizhizhuanhuan(unsigned long kuai_num);	//地址轉換方法，未找到地址返回0
	virtual void bitview_fanzhuan(unsigned long kuai_num, char ft);	//位圖翻轉方法，第一個參數為塊號，第二個參數傳1置1，傳0置0
	virtual unsigned long get_all_size() override;
	virtual unsigned long get_used_size() override;
	virtual double get_used_baifenbi() override;
	virtual void ser_all_size() override;
	virtual void ser_used_size() override;
};
#endif
